#include<iostream>

using namespace std;

int main() 
{
    cout << "Input two numbers:" << endl;
    int from = 0, to = 0;
    cin >> from >> to;
    cout << "Output numbers from " << from << " to " << to << endl;
    if (from <= to) {
        for (int i = from; i <= to; i++) {
            cout << i << " ";
        }
        cout << endl;
        return 0;
    }

    for (int i = from; i >= to; i--) {
        cout << i << " ";
    }
    cout << endl;
    return 0;
}